package com.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.List;

@TableName("sp_category")
@Data
public class Category {
    @TableId(type = IdType.AUTO)
    private Integer cat_id;
    private String cat_name;
    private Integer cat_pid;
    private Integer cat_level;
    private Boolean cat_deleted;

    @TableField(exist = false)
    private List<Category> children;

    public void setCatId(Integer cat_id) {
        this.cat_id = cat_id;
    }

    public void setCatName(String cat_name) {
        this.cat_name = cat_name;
    }

    public void setCatPid(Integer cat_pid) {
        this.cat_pid = cat_pid;
    }

    public void setCatLevel(Integer cat_level) {
        this.cat_level = cat_level;
    }

    public void setCatDeleted(Boolean cat_deleted) {
        this.cat_deleted = cat_deleted;
    }
}
